package object;

public class Human {
    private String name;
    private int age;
    private double salary;

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    /**
     *
     * @param name 食物名称
     * @return 食物
     */
    public Food cooking(String name){
        return new Food(name);
    }
    public String eat(Food food){
        String str=food.sub();
        return name+","+str;
    }

}
